package com.geccocrawler.gecco.demo.shijiazhuang;

import com.geccocrawler.gecco.GeccoEngine;
import com.geccocrawler.gecco.request.HttpGetRequest;
import com.geccocrawler.gecco.spider.JsonBean;

/**
 * Created with IntelliJ IDEA.
 * Description:河北石家庄
 * User: weixiaohu
 * Date: 2019/6/3
 * Time: 11:28
 */
public class SpiderMain implements JsonBean{

    public static void main(String[] args) {
        String jgUrl = "http://www.sjz12333.gov.cn/si/pages/zcore/zajax.jsp?page=ylbxjg&n=1&size=50&name1=&name2=&name3=&value1=&value2=&value3=&_=" + System.currentTimeMillis();
        HttpGetRequest start1 = new HttpGetRequest(jgUrl);
        start1.setCharset("GBK");
//        String ydUrl = "http://www.sjz12333.gov.cn/si/pages/zcore/zajax.jsp?page=ylbxyd&n=1&size=50&name1=&name2=&name3=&value1=&value2=&value3=&_=" + System.currentTimeMillis();
//        HttpGetRequest start2 = new HttpGetRequest(ydUrl);
//        start2.setCharset("GBK");
        GeccoEngine.create()
                .classpath("com.geccocrawler.gecco.demo.shijiazhuang")
                .thread(2)
                .interval(2000)
                .start(start1)
                //.start(start2)
                .start();

    }
}
